<html xmlns:th="http://www.thymeleaf.org">
<!-- 通用 CSS -->
<head th:fragment="header(title)">
    <meta charset="utf-8">
    <title th:text="${title}"></title>
    <meta name="keywords" content="layuimini,layui,layui模板,layui后台,后台模板,admin,admin模板,layui mini">
    <meta name="description" content="layuimini基于layui的轻量级前端后台管理框架，最简洁、易用的后台框架模板，面向所有层次的前后端程序,只需提供一个接口就直接初始化整个框架，无需复杂操作。">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="icon" th:href="@{/layuimini/images/favicon.ico}">
    <link rel="stylesheet" th:href="@{/layuimini/lib/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/css/layuimini.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/css/themes/default.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">

    <link rel="stylesheet" th:href="@{/layuimini/css/public.css}" media="all">
    <script>
        var pName = '/z';
    </script>
</head>

<!-- 通用 JAVASCRIPT -->
<div th:fragment="footer">
    <script th:src="@{/layuimini/lib/layui/layui.js}"></script>
    <script th:src="@{/layuimini/js/lay-config.js}"></script>
    <script th:src="@{/layuimini/js/jquery.min.js}"></script>
    <script th:src="@{/layuimini/js/cUtils.js}"></script>
    <script>
        function loadScript(url, callback) {
            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.onload = callback;
            script.src = url;
            document.head.appendChild(script);
        }

        // 在特定时间加载特定的JS文件
        var specificTime = '12-25'; // 设置特定时间


        // 获取当前日期的月份（从0开始，0表示一月）
        var currentMonth = new Date().getMonth() + 1;

        // 获取当前日期的日期数
        var currentDate = new Date().getDate();
        var nowDay = currentMonth+"-"+currentDate; // 获取当前时间

        if (nowDay == specificTime) {
            let htmlStr = '<div class="container">\n' +
                '        <div class="demo">\n' +
                '            <div class="snowwrap">\n' +
                '                <div class="snow-container"></div>\n' +
                '            </div>\n' +
                '\n' +
                '            <style type=\'text/css\'>\n' +
                '                .snowwrap,.snow-container{position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100001;}\n' +
                '            </style>\n' +
                '        </div>\n'+
                '    </div>';
            document.body.innerHTML += htmlStr;
            loadScript('/z/layuimini/js/jquery.min.js', function() {
                // 特定JS文件加载完成后执行的回调函数
                console.log('jquery.min.js 已加载');
                loadScript('/z/layuimini/lib/specificTime/snow.js', function() {
                    // 特定JS文件加载完成后执行的回调函数
                    console.log('snow.js 已加载');
                });
            });

        }

    </script>
</div>

</html>

